<BR />
<?
	$cat=(int)$_REQUEST['id'];
	$muc=(int)$_REQUEST['muc'];
	if ($cat==0) $cat=1;
	$news_per_page=5;
	$p=(int)$_REQUEST['p'];
	$where="1=1 and status=0";
	if ($cat>0) $where.=" and categories_id=".$cat;

$total=CountRecord("news",$where);
?>
<?
	$sql = "select * from news where $where order by date_added,news_ordered desc limit ".$news_per_page*$p.",".$news_per_page;
	$result = @mysql_query($sql,$con);
	while(($n=mysql_fetch_assoc($result)))	
	{
if($_REQUEST['lg']!=1){
?>      
<div class="boxtt"> 
			<ul class="boxtt1">
              <? if($n['news_image']!='') {?> <a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&lg=0">
			<img src="<? echo $n['news_image']; ?>" border="0" align="left" vspace="5" hspace="5" width="100" ></a><? }?><strong><a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>&lg=0">
		<? echo $n['news_subject']; ?></a></strong><br />
				 <span> <i>(<? echo date('d/m/y',strtotime($n['date_added'])); ?>)</i></span>
           	     <li><?    $a=catchuoi($n['news_shortcontent'],500); echo $a;?>&nbsp;&nbsp;&nbsp;&nbsp;  <a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>"><font color="#FF6633"> Chi ti&#7871;t..</font></a></li>
            </ul> 
</div>
<?
} else{
?>
<div class="boxtt"> 
			<ul class="boxtt1">
              <? if($n['news_image']!='') {?> <a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&lg=1">
			<img src="<? echo $n['news_image']; ?>" border="0" align="left" vspace="5" hspace="5" width="100" ></a><? }?><strong><a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>&lg=1">
		<? echo $n['news_source']; ?></a></strong><br />
				 <span> <i>(<? echo date('d/m/y',strtotime($n['date_added'])); ?>)</i></span>
           	     <li><?    $a=catchuoi($n['news_content'],500); echo $a;?>&nbsp;&nbsp;&nbsp;&nbsp;  <a href="./?frame=newsview&id=<? echo $n['news_id']; ?>&muc=<?=$muc?>"><font color="#FF6633"> Chi ti&#7871;t..</font></a></li>
            </ul> 
</div>

     
<? }}
$total=CountRecord("news",$where." and status=0 and categories_id=".$cat);
if ($total>0) ListPaging($total,count_page($total,$news_per_page),$p,"./?frame=".$_REQUEST['frame']."&cat=".$cat."&menuid=".$_REQUEST['menuid']."&p=","m&#7909;c");
?>